package io.kiki.sba.registry.api.exchange.message;

import io.kiki.sba.registry.api.Callback;
import io.kiki.sba.registry.common.model.store.Url;

public class SimpleRequest<T> implements Request<T> {
    private final T req;
    private final Url url;
    private final Callback callback;

    public SimpleRequest(T req, Url url) {
        this(url, req, null);
    }

    public SimpleRequest(Url url, T req, Callback callback) {
        this.req = req;
        this.url = url;
        this.callback = callback;
    }

    @Override
    public T getRequestBody() {
        return req;
    }

    @Override
    public Url getRequestUrl() {
        return url;
    }

    @Override
    public Callback getCallBack() {
        return callback;
    }
}
